package cn.bjc.pet.domain;

import cn.bjc.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PetType extends BaseDomain {
    //宠物名字
    private String name;
    //宠物描述
    private String description;
    //类型-级联
    private String dirPath;
    //父级类型
    private Long pid;
    private PetType parent;
        
    //用于封装当前类型的子类型
    //类型树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<PetType> children = new ArrayList<>();
}
